package com.gxa.jd.service;

import com.gxa.exception.CustomerException;
import com.gxa.jd.pojo.User;
import com.gxa.entity.PageResult;

import java.util.*;

/**
 * user业务逻辑层
 */
public interface UserService {

    public Map<String,String>  wxLogin(String code) throws CustomerException;

    public Map<String,String>  login(String phone, String code) throws CustomerException;

    /**
     * 根据token查询用户信息
     * @param token
     * @return
     */
    public User queryUserByToken(String token) throws CustomerException;



    /**
     * 修改用户信息
     * @param user
     */
    public void updateUser(User user);




    public List<User> findAll();


    public PageResult<User> findPage(int page, int size);


    public List<User> findList(Map<String, Object> searchMap);


    public PageResult<User> findPage(Map<String, Object> searchMap, int page, int size);


    public User findById(Long id);

    public void add(User user);


    public void update(User user);


    public void delete(Long id);

}
